<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$meta_title}|{:L('_SNS_BACKSTAGE_MANAGE_')}</title>
    <link href="__ROOT__/Public/favicon.ico" type="image/x-icon" rel="shortcut icon">


    <!--OC 自定义样式-->
    <link rel="stylesheet" href="__CSS__/oc.css" media="all">
    <!--OC 自定义样式 end-->
    <link rel="stylesheet" href="__STATIC__/os-icon/simple-line-icons.min.css" media="all">
    <link rel="stylesheet" type="text/css" href="__CSS__/oc/admin.css" media="all">
    <!--adminlte-->
    <link rel="stylesheet" href="__ALTE__/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="__ALTE__/dist/css/AdminLTE.min.css">
    <link rel="stylesheet" href="__ALTE__/dist/css/skins/_all-skins.min.css">
    <link rel="stylesheet" href="__ALTE__/dist/css/skins/skin-black-light.min.css">
    <!-- iCheck -->
    <link rel="stylesheet" href="__ALTE__/plugins/iCheck/flat/blue.css">
    <link href="__BTS__/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
    <link href="__BTS__/plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
    <link href="__BTS__/css/components.min.css" rel="stylesheet" id="style_components" type="text/css">

    <link rel="stylesheet" href="__CSS__/adminlte.css" media="all">
    <link rel="stylesheet" href="__CSS__/namecard.css" media="all">
    <link rel="stylesheet" href="__CSS__/reset.css" media="all">
    <!--adminlte end-->
    <!-- BEGIN THEME LAYOUT STYLES -->
    <link href="__BTS__/plugins/layouts/layout/css/layout.min.css" rel="stylesheet" type="text/css"/>
    <link href="__ALTE__/plugins/jQueryUI/jquery-ui.min.css" rel="stylesheet" type="text/css"/>
    <!-- END THEME LAYOUT STYLES -->

    <!--[if lt IE 9]>
    <script type="text/javascript" src="__STATIC__/jquery-1.10.2.min.js"></script>
    <![endif]--><!--[if gte IE 9]><!-->
    <script type="text/javascript" src="__PUBLIC__/js/jquery-2.0.3.min.js"></script>
    <script type="text/javascript" src="__JS__/jquery.mousewheel.js"></script>
    <!--<![endif]-->
    <block name="style"></block>
    <script type="text/javascript">
        var ThinkPHP = window.Think = {
            "ROOT": "__ROOT__", //当前网站地址
            "APP": "__APP__", //当前项目地址
            "PUBLIC": "__PUBLIC__", //项目公共目录地址
            "DEEP": "{:C('URL_PATHINFO_DEPR')}", //PATHINF{:L("_O_SEGMENTATION_")}
            "MODEL": ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
            "VAR": ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"],
            'URL_MODEL': "{:C('URL_MODEL')}"
        }
        var _ROOT_ = "__ROOT__";
    </script>
</head>
<body class="hold-transition skin-black-light sidebar-mini">
<div class="wrapper">
    <header data-role="top-sidebar" class="main-header" style="border-bottom: 1px solid #ddd;">
        <!-- Logo -->
        <a href="{:U('Index/index')}" class="logo">
            <img style="height: 38px;margin-top: -6px" src="__IMG__/logo.png" alt="logo" class="logo-default"> 智果内容付费
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top">
            <!-- Sidebar toggle button-->
            <div class="collapse navbar-collapse navbar-collapse-example">
                <ul class="nav navbar-nav top-menu">
                    <volist name="__MENU__.main" id="menu">
                        <neq name="menu.hide" value="1">
                            <li data-id="{$menu.id}" class="mega-menu-dropdown {$menu.class|default=''}">
                                <a href="{$menu.url|U}" class="dropdown-toggle " data-hover="dropdown"
                                   data-close-others="true">
                                    <neq name="menu.icon" value=""><i class="icon-{$menu.icon}"></i>&nbsp; </neq>
                                    {$menu.title}
                                    <i class="fa fa-angle-down"></i>
                                </a>
                                <ul class="dropdown-menu" >
                                    <li>
                                        <!-- Content container to add padding -->
                                        <div class="mega-menu-content">
                                            <div class="row">
                                                <php>$k=0;</php>
                                                <volist name="menu.children" id="children">
                                                    <php>
                                                        $k++;
                                                        if(($k%4)==1){
                                                        $style="clear:left";
                                                        }else{
                                                        $style="";
                                                        }
                                                    </php>
                                                    <div class="col-md-3"  style="{$style};width:190px">
                                                        <ul class="mega-menu-submenu">
                                                            <li><h3>{$key}</h3></li>
                                                            <volist name="children" id="child">
                                                                <li>
                                                                    <a href="{$child.url|U}">{$child.title}</a>
                                                                </li>
                                                            </volist>
                                                        </ul>
                                                    </div>
                                                </volist>
                                            </div>
                                        </div>
                                    </li>
                                </ul>
                            </li>
                        </neq>
                    </volist>
                </ul>
                <ul class="nav navbar-nav navbar-right">
                    <li><a href="javascript:;" onclick="clear_cache()"><i class="icon-trash"></i> {:L('_CACHE_CLEAR_')}</a>
                    </li>
                    <li><a target="_blank" href="{:U('Mall/Index/index')}"><i class="icon-copy"></i>
                        {:L('_FORESTAGE_OPEN_')}</a></li>
                    <li class="dropdown" style="margin-right: 15px;">
                        <php>
                            $avatar = query_user(array('avatar128'));
                        </php>
                        <a style="padding: 13px 15px 12px" href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img  src="{$avatar.avatar32}" class="avatar-img  small-img">
                            {:session('user_auth.username')}
                        </a>
                        <ul class="dropdown-menu name-card" role="menu">
                            <div class="head-box">
                                <img src="{$avatar.avatar128}" class="avatar-img">
                                <p> {:session('user_auth.username')}
                                    <small>注册于2016年7月</small>
                                </p>
                            </div>
                            <div class="btn-box">
                                <a href="{:U('User/updatePassword')}" class="btn">修改密码/昵称</a>
                                <a href="{:U('Public/logout')}" class="btn pull-right">{:L('_EXIT_')}</a>
                            </div>
                        </ul>
                    </li>
                    <!-- Control Sidebar Toggle Button -->
                    <!--<li style="  margin-right: 15px;">
                        <a href="#" data-toggle="control-sidebar"><i class="fa fa-gears"></i></a>
                    </li>-->
                    <script>
                        function clear_cache() {
                            $.get('__ROOT__/cc.php');
                            toast.success("{:L('_CACHE_CLEAR_SUCCESS_')}{:L('_PERIOD_')}");
                        }
                    </script>
                </ul>
            </div>

        </nav>
    </header>
    <!-- Left side column. contains the logo and sidebar -->
    <aside data-role="left-sidebar"  class="main-sidebar">
        <!-- sidebar: style can be found in sidebar.less -->
        <section class="sidebar">
            <!-- Sidebar user panel -->
            <!-- sidebar menu: : style can be found in sidebar.less -->
            <ul class="sidebar-menu">
                <li class="header">应用管理</li>
                <volist name="__MODULE_MENU__" id="v">
                    <if condition="$v['is_setup'] AND $v['admin_entry']">
                            <li>
                                <a href="{:U($v['admin_entry'])}" >
                                    <span>{$v.alias}</span>
                                </a>
                            </li>
                    </if>
                </volist>
            </ul>
        </section>
    <!--    <section class="sidebar">
            &lt;!&ndash; sidebar menu: : style can be found in sidebar.less &ndash;&gt;
            <ul class="sidebar-menu">
                <li class="header">模块</li>


            </ul>
        </section>-->
        <!-- /.sidebar -->
    </aside>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper" style="min-height: 900px;">
        <ul class="sub_menu">

            <notEmpty name="__MENU__.child">
                <li class="treeview">

                    <ul class="treeview-menu">
                        <volist name="__MENU__.child" id="children">
                            <notEmpty name="children">
                                <li class="heading">
                                    <h4 class="uppercase"> {$key}</h4>
                                </li>
                                <volist name="children" id="child">
                                    <li><a href="{$child.url|U}">
                                        {$child.title}</a></li>
                                </volist>
                            </notEmpty>

                        </volist>
                    </ul>
                </li>

            </notEmpty>
        </ul>
        <div style="padding:10px;padding-left:0;padding-bottom:10px;left: 335px;position:absolute;right: 0;bottom: 0;top: 50px;overflow: auto">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <block name="main-header"></block>
            </section>

            <!-- Main content -->
            <section class="content">
                <div id="main-content">
                    <eq name="update" value="1">
                        <div id="top-alert" class="alert alert-success alert-dismissable"
                             style="position: absolute;left: 50%;margin-left: -150px;width: 300px;box-shadow: rgba(95, 95, 95, 0.4) 3px 3px 3px;z-index:999">
                            <i class="icon-ok-sign" style="font-size: 28px"></i> &nbsp;&nbsp;
                            {:L('_VERSION_UPDATE_',array('href'=> '<a class="alert-link" href="'.U('Cloud/update').'">'
                            ))}</a>
                            <button class="close fixed" style="margin-top: 4px;">&times;</button>
                        </div>
                    </eq>

                    <div id="main" style="overflow-y:auto;overflow-x:hidden;">
                        <block name="nav">
                            <!-- nav -->
                            <notempty name="_show_nav">
                                <div class="breadcrumb">
                                    <span>{:L('_YOUR_POSITION_')}{:L('_COLON_')}</span>
                                    <assign name="i" value="1"/>
                                    <foreach name="_nav" item="v" key="k">
                                        <if condition="$i eq count($_nav)">
                                            <span>{$v}</span>
                                            <else/>
                                            <span><a href="{$k}">{$v}</a>&gt;</span>
                                        </if>
                                        <assign name="i" value="$i+1"/>
                                    </foreach>
                                </div>
                            </notempty>
                            <!-- nav -->
                        </block>

                        <div class="admin-main-container">
                            <block name="body"></block>
                        </div>

                    </div>
                </div>
            </section>
            <!-- /.content -->
        </div>

    </div>
    <!-- /.content-wrapper -->
    <footer class="main-footer">
        <block name="main-footer"></block>
    </footer>
    <!-- Control Sidebar -->
    <!--<aside class="control-sidebar control-sidebar-dark" style="position: fixed;height: auto;">
        &lt;!&ndash; Create the tabs &ndash;&gt;
        <ul class="nav nav-tabs nav-justified control-sidebar-tabs">
            <li class="active"><a href="#control-sidebar-home-tab" data-toggle="tab" aire-expend="true"><i class="fa fa-home"></i></a></li>
            <li><a href="#control-sidebar-stats-tab" data-toggle="tab"><i class="fa fa-gear"></i></a></li>
            <li><a href="#control-sidebar-settings-tab" data-toggle="tab"><i class="fa fa-gears"></i></a></li>
        </ul>
        &lt;!&ndash; Tab panes &ndash;&gt;
        <div class="tab-content">
            &lt;!&ndash; Home tab content &ndash;&gt;
            <div class="tab-pane active" id="control-sidebar-home-tab">
                <h3 class="control-sidebar-heading">Recent Activity</h3>
                <ul class="control-sidebar-menu">
                    <li>
                        <a href="javascript:void(0)">
                            <i class="menu-icon fa fa-birthday-cake bg-red"></i>

                            <div class="menu-info">
                                <h4 class="control-sidebar-subheading">Langdon's Birthday</h4>

                                <p>Will be 23 on April 24th</p>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)">
                            <i class="menu-icon fa fa-user bg-yellow"></i>

                            <div class="menu-info">
                                <h4 class="control-sidebar-subheading">Frodo Updated His Profile</h4>

                                <p>New phone +1(800)555-1234</p>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)">
                            <i class="menu-icon fa fa-envelope-o bg-light-blue"></i>

                            <div class="menu-info">
                                <h4 class="control-sidebar-subheading">Nora Joined Mailing List</h4>

                                <p>nora@example.com</p>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)">
                            <i class="menu-icon fa fa-file-code-o bg-green"></i>

                            <div class="menu-info">
                                <h4 class="control-sidebar-subheading">Cron Job 254 Executed</h4>

                                <p>Execution time 5 seconds</p>
                            </div>
                        </a>
                    </li>
                </ul>
                &lt;!&ndash; /.control-sidebar-menu &ndash;&gt;

                <h3 class="control-sidebar-heading">Tasks Progress</h3>
                <ul class="control-sidebar-menu">
                    <li>
                        <a href="javascript:void(0)">
                            <h4 class="control-sidebar-subheading">
                                Custom Template Design
                                <span class="label label-danger pull-right">70%</span>
                            </h4>

                            <div class="progress progress-xxs">
                                <div class="progress-bar progress-bar-danger" style="width: 70%"></div>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)">
                            <h4 class="control-sidebar-subheading">
                                Update Resume
                                <span class="label label-success pull-right">95%</span>
                            </h4>

                            <div class="progress progress-xxs">
                                <div class="progress-bar progress-bar-success" style="width: 95%"></div>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)">
                            <h4 class="control-sidebar-subheading">
                                Laravel Integration
                                <span class="label label-warning pull-right">50%</span>
                            </h4>

                            <div class="progress progress-xxs">
                                <div class="progress-bar progress-bar-warning" style="width: 50%"></div>
                            </div>
                        </a>
                    </li>
                    <li>
                        <a href="javascript:void(0)">
                            <h4 class="control-sidebar-subheading">
                                Back End Framework
                                <span class="label label-primary pull-right">68%</span>
                            </h4>

                            <div class="progress progress-xxs">
                                <div class="progress-bar progress-bar-primary" style="width: 68%"></div>
                            </div>
                        </a>
                    </li>
                </ul>
                &lt;!&ndash; /.control-sidebar-menu &ndash;&gt;

            </div>
            &lt;!&ndash; /.tab-pane &ndash;&gt;
            &lt;!&ndash; Stats tab content &ndash;&gt;
            <div class="tab-pane" id="control-sidebar-stats-tab">Stats Tab Content</div>
            &lt;!&ndash; /.tab-pane &ndash;&gt;
            &lt;!&ndash; Settings tab content &ndash;&gt;
            <div class="tab-pane" id="control-sidebar-settings-tab">
                <form method="post">
                    <h3 class="control-sidebar-heading">General Settings</h3>

                    <div class="form-group">
                        <label class="control-sidebar-subheading">
                            Report panel usage
                            <input type="checkbox" class="pull-right" checked>
                        </label>

                        <p>
                            Some information about this general settings option
                        </p>
                    </div>
                    &lt;!&ndash; /.form-group &ndash;&gt;

                    <div class="form-group">
                        <label class="control-sidebar-subheading">
                            Allow mail redirect
                            <input type="checkbox" class="pull-right" checked>
                        </label>

                        <p>
                            Other sets of options are available
                        </p>
                    </div>
                    &lt;!&ndash; /.form-group &ndash;&gt;

                    <div class="form-group">
                        <label class="control-sidebar-subheading">
                            Expose author name in posts
                            <input type="checkbox" class="pull-right" checked>
                        </label>

                        <p>
                            Allow the user to show his name in blog posts
                        </p>
                    </div>
                    &lt;!&ndash; /.form-group &ndash;&gt;

                    <h3 class="control-sidebar-heading">Chat Settings</h3>

                    <div class="form-group">
                        <label class="control-sidebar-subheading">
                            Show me as online
                            <input type="checkbox" class="pull-right" checked>
                        </label>
                    </div>
                    &lt;!&ndash; /.form-group &ndash;&gt;

                    <div class="form-group">
                        <label class="control-sidebar-subheading">
                            Turn off notifications
                            <input type="checkbox" class="pull-right">
                        </label>
                    </div>
                    &lt;!&ndash; /.form-group &ndash;&gt;

                    <div class="form-group">
                        <label class="control-sidebar-subheading">
                            Delete chat history
                            <a href="javascript:void(0)" class="text-red pull-right"><i class="fa fa-trash-o"></i></a>
                        </label>
                    </div>
                    &lt;!&ndash; /.form-group &ndash;&gt;
                </form>
            </div>
            &lt;!&ndash; /.tab-pane &ndash;&gt;
        </div>
    </aside>-->
    <!-- /.control-sidebar -->
    <!-- Add the sidebar's background. This div must be placed
         immediately after the control sidebar -->
    <div class="control-sidebar-bg"></div>
</div>

<!--adminlte-->
    <!-- FastClick -->
<script src="__ALTE__/plugins/fastclick/fastclick.js"></script>
<script src="__ALTE__/bootstrap/js/bootstrap.min.js"></script>
<script src="__BTS__/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js" type="text/javascript"></script>
<script src="__ALTE__/dist/js/app.min.js"></script>
<link rel="stylesheet" href="__BTS__/plugins/bootstrap-toastr/toastr.min.css">
<script src="__BTS__/plugins/bootstrap-toastr/toastr.min.js" type="text/javascript"></script>
<script src="__ALTE__/plugins/jQueryUI/jquery-ui.min.js" type="text/javascript"></script>
<!--adminlte end-->
<script type="text/javascript" src="__JS__/com/com.toast.class.js"></script>

<script type="text/javascript">
    (function () {
        var ThinkPHP = window.Think = {
            "ROOT": "__ROOT__", //当前网站地址
            "APP": "__APP__", //当前项目地址
            "PUBLIC": "__PUBLIC__", //项目公共目录地址
            "DEEP": "{:C('URL_PATHINFO_DEPR')}", //PATHINFO分割符
            "MODEL": ["{:C('URL_MODEL')}", "{:C('URL_CASE_INSENSITIVE')}", "{:C('URL_HTML_SUFFIX')}"],
            "VAR": ["{:C('VAR_MODULE')}", "{:C('VAR_CONTROLLER')}", "{:C('VAR_ACTION')}"],
            'URL_MODEL': "{:C('URL_MODEL')}"
        }
    })();
</script>
<script type="text/javascript" src="__STATIC__/think.js"></script>
<script type="text/javascript" src="__JS__/common.js"></script>


<script type="text/javascript">
    +function () {
      /*  $('[data-role="left-sidebar"] .treeview').hover(function () {
            var height=$(this).find('.treeview-menu').height();
            var top_height=$(this).offset().top;
            var total_height=$('[data-role="left-sidebar"]').height()+$('[data-role="left-sidebar"]').offset().top;
            if(total_height<top_height+height){
                var top=total_height-top_height-height;
                $(this).find('.treeview-menu').css('top',top);
            }
        });*/
        $('[data-role="top-sidebar"] .mega-menu-dropdown').hover(function () {
            var width= $(this).find('.dropdown-menu').width();
            var left_width=$(this).offset().left;
            var total_width=document.body.scrollWidth;
            if(total_width<left_width+width){
                var left=total_width-left_width-width;
                $(this).find('.dropdown-menu').css('left',left);
            }
        });
        var $window = $(window), $subnav = $("#subnav"), url;
        $window.resize(function () {
            $("#main").css("min-height", $window.height() - 130);
        }).resize();

        // 导航栏超出窗口高度后的模拟滚动条
        var sHeight = $(".sidebar").height();
        var subHeight = $(".subnav").height();
        var diff = subHeight - sHeight; //250
        var sub = $(".subnav");
        if (diff > 0) {
            $(window).mousewheel(function (event, delta) {
                if (delta > 0) {
                    if (parseInt(sub.css('marginTop')) > -10) {
                        sub.css('marginTop', '0px');
                    } else {
                        sub.css('marginTop', '+=' + 10);
                    }
                } else {
                    if (parseInt(sub.css('marginTop')) < '-' + (diff - 10)) {
                        sub.css('marginTop', '-' + (diff - 10));
                    } else {
                        sub.css('marginTop', '-=' + 10);
                    }
                }
            });
        }
    }();
    highlight_subnav("{:U('Admin'.'/'.CONTROLLER_NAME.'/'.ACTION_NAME,$_GET)}")

    function displaySubMenu(li) {
        var subMenu = li.getElementsByTagName("ul")[0];
        subMenu.style.display = "block";
    }
    function hideSubMenu(li) {
        var subMenu = li.getElementsByTagName("ul")[0];
        subMenu.style.display = "none";
    }
    $(function () {
        $('.mega-menu-dropdown').hover(function () {
           $(this).find('.dropdown-menu').css('width',$(this).find('.mega-menu-content .row').children().length*200+'px')
        })
    })
</script>
<block name="script"></block>
<block name="modal">
</block>
</body>
</html>
